#include "tp_playerstage_qt_cartagraphie.h"
#include "ThreadHIMM.h"

#include  <QGraphicsView>
#include <qpushbutton.h>
#include <qdebug.h>
#include <qgraphicsitem.h>
#include <QTime>

#include "Map/Cell.h"
#include "Map/Map.h"
#include "Map/MapViewer.h"
#include <math.h>

#include <QKeyEvent>
tp_playerstage_qt_cartagraphie::tp_playerstage_qt_cartagraphie(QWidget *parent)
    : QWidget(parent)
{

	gridLayout = new QGridLayout(this);

	//Follow2
//
	Map *map = new Map(20,20,7,6);
	//Cave
//	Map *map = new Map(23,23,4,0.2);
	//Empty
//	Map *map = new Map(15,15,7,6);
//
//	Map *map = new Map(4,6,8,5);
//
//	qDebug()<< map->getY(-2.99);
//	qDebug()<< map->getY(2.99);
//
//	qDebug()<< map->getX(-2.1);
//	qDebug()<< map->getX(2);


	MapViewer *mv = new MapViewer(map);

	gridLayout->addWidget(mv);

	ThreadHIMM* t = new ThreadHIMM(map);
	t->start();
}

tp_playerstage_qt_cartagraphie::~tp_playerstage_qt_cartagraphie()
{

}
